package com.qk.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.Page;
import com.qk.common.PageResult;
import com.qk.dto.OperatorLogDto;
import com.qk.entity.OperateLog;
import com.qk.mapper.OperateLogMapper;
import com.qk.service.OperatorLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OperatorLogServiceimpl extends ServiceImpl<OperateLogMapper, OperateLog> implements OperatorLogService {
    @Autowired
    private OperateLogMapper operateLogMapper;
    @Override
    public PageResult<OperateLog> listOperatorLogs(OperatorLogDto operatorLogDto) {
        Page<OperateLog> page = operateLogMapper.listOperatorLogs(new Page<OperateLog>(operatorLogDto.getPage(),operatorLogDto.getPageSize()),operatorLogDto);
        return new PageResult<>(page.getTotal(),page.getResult());
    }
}
